#include <a_samp>
#include <streamer>
#include <sscanf2>
#include <colours>
#define FILTERSCRIPT
#define msg SendClientMessage


#define MAX_MAPS    (100)
#define INDEX_FILE	"Maps/mapindex.txt"

forward IslandVehicleReset();
forward CloseDoor(objectid, playerid);
forward togcont(playerid);


new
	lv_HouseGate,
	lv_CastleGates[10],
	ls_HouseGate,
	sf_AlleysGate1,
	sf_AlleysGate2,
	sf_AlleysGarage,
	sf_LoadingBayDoor,
	des_WhShutter[5],
	des_FenceGate,
	ls_IslandV[15],
	ls_IslandObj[91],
	
	obj_GlobalID,

	obj_idArray[MAX_MAPS][2],
	obj_idUsed[MAX_MAPS char];


stock Float:Distance(Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2)return floatpower((floatpower((x1-x2),2)+floatpower((y1-y2),2)+floatpower((z1-z2),2)), 0.5);
LoadMap(mapfile[], world=0, interior=0, Float:dist=350.0)
{
	new filename[100];
	format(filename, 100, "Maps/%s", mapfile);
	new
		File:F=fopen(filename, io_read),
		str[150],
		modelid,
		Float:data[6],
		line;
	if(!fexist(filename))return printf("ERROR- file: \"%s\" NOT FOUND", mapfile);

	new tmpObjID;
	while(obj_idUsed[tmpObjID]!=0)tmpObjID++;
	obj_idArray[tmpObjID][0]=obj_GlobalID;

	while(fread(F, str))
	{
	    line++;
		if(!sscanf(str, "p<(>{s[17]}p<,>dfffffp<)>f", modelid, data[0], data[1], data[2], data[3], data[4], data[5]))
		{
/*For finding missing objects
		    new Float:d=Distance(data[0], data[1], data[2], 1178.0, -1400.0, 464.0);
		    if(d<=300)printf("obj found in '%s' id: %d", filename, modelid);
*/
			CreateDynamicObject(modelid, data[0], data[1], data[2], data[3], data[4], data[5], world, interior, _, dist);
			obj_GlobalID++;
		}
		else printf("ERROR- file: \"%s\", line: %d", mapfile, line);
	}
	fclose(F);
	
	obj_idArray[tmpObjID][1]=line;
/*
	new File:tmpF = fopen(INDEX_FILE, io_append), tmpStr[100];
	format(tmpStr, 100, "%s, %d, %d, %f\r\n", mapfile, world, interior, dist);
	fwrite(tmpF, tmpStr);
	fclose(tmpF);
*/

	return line;
}

LoadAllMaps()
{
	new
	    line[128],
		File:idxFile = fopen(INDEX_FILE, io_read),
		tmpStr[100],
		world,
		interior,
		Float:distance;

	while(fread(idxFile, line))
	{
	    sscanf(line, "p<,>s[100]ddf", tmpStr, world, interior, distance);
	    LoadMap(tmpStr, world, interior, distance);
	}
	fclose(idxFile);
}

#define FREEROAM_WORLD		(0)
#define DEATHMATCH_WORLD	(1)
#define RACE_WORLD			(2)
#define ABD_WORLD			(3)


public OnFilterScriptInit()
{
	print("\n---------------------------");
	print(" MapMods Script loaded");

    LoadAllMaps();

	GenMaps();
	StuntMaps();
	RaceMaps();
	TestMaps();
	AbandonMaps();


	print("  ----  Object Data  ----  ");
	printf("   %d\t- Total Objects", CountDynamicObjects());
	print("---------------------------\n");
	return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	if( ( (newkeys & KEY_CROUCH) && (IsPlayerInAnyVehicle(playerid)) ) || ( (newkeys == 16) && (!IsPlayerInAnyVehicle(playerid))) )
	{
	    if(IsPlayerInRangeOfPoint(playerid, 5.0, 2737.464600, 1188.553833, 6.932312))
	    {
            MoveDynamicObject(lv_HouseGate, 2740.464600, 1193.553833, 6.932312, 3.5);
            SetTimerEx("CloseDoor", 5000, false, "dd", lv_HouseGate, playerid);
	    }
	    if(IsPlayerInRangeOfPoint(playerid, 5.0, 2913.187500, -969.383118, 13.578079))
	    {
            MoveDynamicObject(ls_HouseGate, 2917.187500, -969.383118, 13.578079, 3.5);
            SetTimerEx("CloseDoor", 5000, false, "dd", ls_HouseGate, playerid);
	    }
	    if(IsPlayerInRangeOfPoint(playerid, 5.0, -2242.047119, 643.289673, 50.108364))
	    {
            MoveDynamicObject(sf_AlleysGate1, -2242.045898, 643.271301, 56.285427, 5);
            SetTimerEx("CloseDoor", 5000, false, "dd", sf_AlleysGate1, playerid);
	    }
	    if(IsPlayerInRangeOfPoint(playerid, 5.0, -2211.508545, 578.692932, 35.823624))
	    {
            MoveDynamicObject(sf_AlleysGate2, -2211.505859, 578.693970, 46.035469, 5);
            SetTimerEx("CloseDoor", 5000, false, "dd", sf_AlleysGate2);
	    }
	    if(IsPlayerInRangeOfPoint(playerid, 5.0, -1979.001953, 500.077972, 30.033659))
	    {
            MoveDynamicObject(sf_LoadingBayDoor, -1979.001953, 500.077972, 22.033659, 5);
            SetTimerEx("CloseDoor", 5000, false, "dd", sf_LoadingBayDoor);
		}
	    if(IsPlayerInRangeOfPoint(playerid, 30.0, 2105.195557, 1156.502930, 10))
	    {
			for(new i;i<10;i++)MoveDynamicObject(lv_CastleGates[i], 2089.163330, 1164.322021, 0.0, 3.5);
            SetTimerEx("CloseDoor", 5000, false, "dd", lv_CastleGates[0]);
		}
	    if(IsPlayerInRangeOfPoint(playerid, 15.0, 837.253, -2054.727, 13))
	    {
	        MoveDynamicObject(ls_IslandObj[71],837.253,-2054.727,8.641,3);
            SetTimerEx("CloseDoor", 5000, false, "dd", ls_IslandObj[71], playerid);
		}
	    if(IsPlayerInRangeOfPoint(playerid, 15.0, 837.244, -2149.939 ,13))
	    {
	        MoveDynamicObject(ls_IslandObj[9],837.244,-2149.939,8.584,3);
            SetTimerEx("CloseDoor", 5000, false, "dd", ls_IslandObj[9], playerid);
		}
	    if(IsPlayerInRangeOfPoint(playerid, 15.0, 752.732, -2254.741, 13))
	    {
	        MoveDynamicObject(ls_IslandObj[49],752.732,-2254.741,7.774,3);
            SetTimerEx("CloseDoor", 5000, false, "dd", ls_IslandObj[49], playerid);
		}
	    if(IsPlayerInRangeOfPoint(playerid, 15.0, -29.601196289063, 2514.2014160156, 9.0))
	    {
			MoveDynamicObject(des_FenceGate, -29.601196289063, 2514.2014160156, 10.0, 3.0);
			SetTimerEx("CloseDoor", 5000, false, "dd", des_FenceGate, playerid);
		}
	}
}
#define Cmd(%1) if(!strcmp(cmd,%1,true,strlen(%1))&&cmd[strlen(%1)+1]==EOS)
public OnPlayerCommandText(playerid, cmdtext[])
{
	new cmd[30], params[100];
	sscanf(cmdtext, "s[30]s[100]", cmd, params);

// Debug CMDs
	Cmd("/visob")		{printf("objects: %d", Streamer_CountVisibleItems(playerid, 0));return 1;}
	Cmd("/reob")		{Streamer_Update(playerid);return 1;}
	Cmd("/deadtown")	{SetPlayerPos(playerid, 1391.92, -1343.16, 352.33);return 1;}
	Cmd("/oilrig")		{SetPlayerPos(playerid, -1151.0, 117.0, 2571.0);return 1;}
	Cmd("/dmap")		{SetPlayerPos(playerid,1211.0, -2706.0, 1183.0);return 1;}
	Cmd("/rmap")		{SetPlayerPos(playerid, -521.0, -3643.0, 7.0);return 1;}
    Cmd("/gup")			{MoveDynamicObject(sf_AlleysGarage, -2211.67, 592.90, 39.49, 1);return 1;}
    Cmd("/gdn")			{MoveDynamicObject(sf_AlleysGarage, -2211.67, 592.86, 35.61, 1);return 1;}
	Cmd("/wtf")			{SetPlayerPos(playerid, 2590.675781, 1210.633057, 864.794373);return 1;}
	Cmd("/skything")	{SetPlayerPos(playerid, 1766.1723632813, -2223.7202148438, 2897.2895507813);return 1;}
	

	//Warehouse des_WhShutters
    Cmd("/shutup")
	{
        MoveDynamicObject(des_WhShutter[0], -1481.880737, 2611.466553, 58.833641, 5.0);
        MoveDynamicObject(des_WhShutter[1], -1485.840820, 2615.600098, 58.983650, 5.0);
        MoveDynamicObject(des_WhShutter[2], -1485.797974, 2623.722412, 58.916321, 5.0);
        MoveDynamicObject(des_WhShutter[3], -1485.812622, 2631.457275, 58.908646, 5.0);
        MoveDynamicObject(des_WhShutter[4], -1485.790649, 2639.139404, 58.833641, 5.0);
        return 1;
    }
    Cmd("/shutdn")
	{
        MoveDynamicObject(des_WhShutter[0], -1481.880737, 2611.466553, 55.0, 5.0);
        MoveDynamicObject(des_WhShutter[1], -1485.840820, 2615.600098, 55.0, 5.0);
        MoveDynamicObject(des_WhShutter[2], -1485.797974, 2623.722412, 55.0, 5.0);
        MoveDynamicObject(des_WhShutter[3], -1485.812622, 2631.457275, 55.0, 5.0);
        MoveDynamicObject(des_WhShutter[4], -1485.790649, 2639.139404, 55.0, 5.0);
        return 1;
    }
	Cmd("/shutter")
	{
	    new dir, sht;
	    if(sscanf(params, "dd", dir, sht))return msg(playerid, YELLOW, "/shutter [up/down-1/0] [des_WhShutter]");
		if(sht==1)
		{
        	if(dir)MoveDynamicObject(des_WhShutter[0], -1481.880737, 2611.466553, 58.833641, 5.0);
        	else MoveDynamicObject(des_WhShutter[0], -1481.880737, 2611.466553, 55.0, 5.0);
		}
		else if(sht==2)
		{
		    if(dir)MoveDynamicObject(des_WhShutter[1], -1485.840820, 2615.600098, 58.983650, 5.0);
		    else MoveDynamicObject(des_WhShutter[1], -1485.840820, 2615.600098, 55.0, 5.0);
		}
		else if(sht==3)
		{
		    if(dir)MoveDynamicObject(des_WhShutter[2], -1485.797974, 2623.722412, 58.916321, 5.0);
		    else MoveDynamicObject(des_WhShutter[2], -1485.797974, 2623.722412, 55.0, 5.0);
		}
		else if(sht==4)
		{
		    if(dir)MoveDynamicObject(des_WhShutter[3], -1485.812622, 2631.457275, 58.908646, 5.0);
		    else MoveDynamicObject(des_WhShutter[3], -1485.812622, 2631.457275, 55.0, 5.0);
		}
		else if(sht==5)
		{
		    if(dir)MoveDynamicObject(des_WhShutter[4], -1485.790649, 2639.139404, 58.833641, 5.0);
		    else MoveDynamicObject(des_WhShutter[4], -1485.790649, 2639.139404, 55.0, 5.0);
		}
		return 1;
    }

    //Island
    Cmd("/iup")
	{
	    MoveIslandUp();
        SetTimerEx("IslandVehicleReset", 10000,0, "i", playerid);
        msg(playerid, YELLOW, "Admin Island is on water.");
        return 1;
    }

    Cmd("/idn")
	{
	    MoveIslandDown();
        for(new i;i<15;i++)DestroyVehicle(ls_IslandV[i]);
        msg(playerid, YELLOW, "Admin island is under water.");
        return 1;
    }
    return 0;
}

public IslandVehicleReset()
{
    ls_IslandV[0] = CreateVehicle(522,748.524,-2274.656,12.505,0.0,-1,-1,5000);
    ls_IslandV[1] = CreateVehicle(522,743.959,-2274.454,12.505,0.0,-1,-1,5000);
    ls_IslandV[2] = CreateVehicle(522,738.832,-2274.475,12.505,0.0,-1,-1,5000);
    ls_IslandV[3] = CreateVehicle(522,733.559,-2274.702,12.511,0.0,-1,-1,5000);
    ls_IslandV[4] = CreateVehicle(522,746.141,-2274.458,12.505,0.0,-1,-1,5000);
    ls_IslandV[5] = CreateVehicle(522,741.485,-2274.460,12.505,0.0,-1,-1,5000);
    ls_IslandV[6] = CreateVehicle(522,736.397,-2274.613,12.511,0.0,-1,-1,5000);
    ls_IslandV[7] = CreateVehicle(411,739.8333,-2237.3860,12.5716,180.0758,64,1,5000);
    ls_IslandV[8] = CreateVehicle(497,734.0182,-2237.7031,12.5531,181.4758,125,125,5000);
    ls_IslandV[9] = CreateVehicle(503,745.3376,-2237.3801,12.5029,179.4346,35,1,5000);
    ls_IslandV[10] = CreateVehicle(560,729.6592,-2237.8525,12.5503,185.3224,9,39,5000);
    ls_IslandV[11] = CreateVehicle(502,738.1107,-2230.9463,12.6445,93.7368,1,1,5000);
    ls_IslandV[12] = CreateVehicle(487,721.7079,-2254.7280,30.7121,320.6754,26,3,5000);
    ls_IslandV[13] = CreateVehicle(520,716.2269,-2263.7908,13.5678,272.5697,0,0,0);
    ls_IslandV[14] = CreateVehicle(520,715.5283,-2248.2231,13.5681,272.5697,0,0,0);
    return 1;
}

public togcont(playerid)TogglePlayerControllable(playerid, 1);

public CloseDoor(objectid, playerid)
{
	if(objectid==lv_CastleGates[0])for(new i;i<10;i++)MoveDynamicObject(lv_CastleGates[i], 2089.163330, 1164.322021, 12.270172, 3.5);
	if(objectid==lv_HouseGate)MoveDynamicObject(lv_HouseGate , 2737.464600, 1188.553833, 6.932312, 3.5);
	if(objectid==ls_HouseGate)MoveDynamicObject(ls_HouseGate, 2916.187500, -963.383118, 13.578079, 3.5);
	if(objectid==ls_IslandObj[71])MoveDynamicObject(ls_IslandObj[71],837.253,-2054.727,14.641,3);
	if(objectid==ls_IslandObj[9])MoveDynamicObject(ls_IslandObj[9],837.244,-2149.939,14.584,3);
	if(objectid==ls_IslandObj[49])MoveDynamicObject(ls_IslandObj[49],752.732,-2254.741,19.774,3);
	if(objectid==sf_AlleysGate1)MoveDynamicObject(sf_AlleysGate1,-2242.047119, 643.289673, 50.108364, 5);
	if(objectid==sf_AlleysGate2)MoveDynamicObject(sf_AlleysGate2,-2211.508545, 578.692932, 35.823624, 5);
	if(objectid==sf_LoadingBayDoor)MoveDynamicObject(sf_LoadingBayDoor,-1979.022339, 500.082306, 30.091356, 5);
	if(objectid==des_FenceGate)MoveDynamicObject(des_FenceGate,-29.601196289063, 2514.2014160156, 18.257766723633, 3.0);
}


GenMaps()
{

	//LoadMap("Gen Maps/Farm Place.txt");
	//LoadMap("Gen Maps/Oil Rig.txt");
	//LoadMap("Gen Maps/Treehouse.txt");
	//LoadMap("Gen Maps/Parkour.txt");
	//LoadMap("Gen Maps/Defiance Bar.txt");

//========================================================================Houses
    lv_HouseGate=CreateDynamicObject(988, 2737.464600, 1188.553833, 6.932312, 0.0000, 0.0000, 270.0); //
	//LoadMap("Gen Maps/LV House.txt");

    ls_HouseGate=CreateDynamicObject(980, 2916.187500, -963.383118, 13.578079, 0.0000, 0.0000, 88.2811);
	//LoadMap("Gen Maps/LS House.txt");

//=============================================Christmas Tree [Only in december]
	new y, m, d;
	getdate(y, m, d);
	if(m == 12)LoadMap("Gen Maps/Xmas Tree.txt");

//====================================================================San Fierro
    sf_AlleysGate1=CreateDynamicObject(1508, -2242.047119, 643.289673, 50.108364, 0.0000, 0.0000, 0.0000);
    sf_AlleysGate2=CreateDynamicObject(1508, -2211.508545, 578.692932, 35.823624, 0.0000, 0.0000, 270.0000);
    sf_AlleysGarage=CreateDynamicObject(17950, -2211.670898, 592.868591, 35.619972, 180.0, 0.00, 0.00);
	//LoadMap("Gen Maps/SF Hideout.txt");
    sf_LoadingBayDoor=CreateDynamicObject(16773, -1979.022339, 500.082306, 30.091356, 0.0000, 0.0000, 179.6223);
	//LoadMap("Gen Maps/SF Hideout 2.txt");

//==========================================================Las Venturas Hangout
    lv_CastleGates[0]=CreateDynamicObject(9625, 2089.163330, 1164.322021, 12.270172, 0.0000, 0.0000, 332.2660);
    lv_CastleGates[1]=CreateDynamicObject(5856, 2099.919922, 1168.348755, 12.653652, 0.0000, 0.0000, 62.3434);
    lv_CastleGates[2]=CreateDynamicObject(5856, 2103.648682, 1166.409912, 12.661411, 0.0000, 0.0000, 62.3434);
    lv_CastleGates[3]=CreateDynamicObject(5856, 2091.960449, 1152.877808, 12.653029, 0.0000, 0.0000, 62.3434);
    lv_CastleGates[4]=CreateDynamicObject(5856, 2095.686768, 1150.917358, 12.654610, 0.0000, 0.0000, 62.3434);
    lv_CastleGates[5]=CreateDynamicObject(5856, 2091.583984, 1169.010376, 11.826485, 0.0000, 0.0000, 333.2028);
    lv_CastleGates[6]=CreateDynamicObject(5856, 2086.585938, 1159.357056, 11.826485, 0.0000, 0.0000, 333.2028);
    lv_CastleGates[7]=CreateDynamicObject(5856, 2103.661865, 1153.614502, 12.652547, 0.0000, 0.0000, 331.4839);
    lv_CastleGates[8]=CreateDynamicObject(5856, 2106.245361, 1158.361206, 12.653348, 0.0000, 0.0000, 331.4839);
    lv_CastleGates[9]=CreateDynamicObject(5856, 2105.195557, 1156.502930, 12.617244, 0.0000, 0.0000, 331.4839);
	//LoadMap("Gen Maps/Hangout.txt");

//==================================================================El Quebrados
    des_WhShutter[0]=CreateDynamicObject(974, -1481.880737, 2611.466553, 58.833641, 0.0000, 0.0000, 0.0000);
    des_WhShutter[1]=CreateDynamicObject(974, -1485.840820, 2615.600098, 58.983650, 0.0000, 0.0000, 90.2408);
    des_WhShutter[2]=CreateDynamicObject(974, -1485.797974, 2623.722412, 58.916321, 0.0000, 0.0000, 90.2408);
    des_WhShutter[3]=CreateDynamicObject(974, -1485.812622, 2631.457275, 58.908646, 0.0000, 0.0000, 90.2408);
    des_WhShutter[4]=CreateDynamicObject(974, -1485.790649, 2639.139404, 58.833641, 0.0000, 0.0000, 90.2408);

//==================================================================Miscelaneous
	AdminIsland();
	//carpark
    CreateDynamicObject(1523, 2272.010254, 1515.215820, 41.803089, 0.0000, 0.0000, 91.1003);
    CreateDynamicObject(1634, 2345.872070, 1685.359985, 19.194153, 0.0000, 0.0000, 0.0000);
    CreateDynamicObject(1634, 2349.341064, 1750.759766, 19.587948, 0.0000, 0.0000, 0.0000);
    CreateDynamicObject(1633, 2343.739990, 1548.405029, 36.781563, 0.0000, 0.0000, 177.0440);
    CreateDynamicObject(979, 2277.393066, 1518.464844, 42.435520, 0.0000, 0.0000, 269.7591);
    CreateDynamicObject(3458, 2299.685059, 1423.145630, 43.341843, 0.0000, 0.0000, 269.7591);
    CreateDynamicObject(1503, 2299.534424, 1450.143066, 42.214432, 0.0000, 0.0000, 181.3413);
    CreateDynamicObject(1503, 2301.102295, 1450.268555, 42.189430, 0.0000, 0.0000, 181.3413);
    CreateDynamicObject(12978, 2351.704834, 1504.643799, 42.211891, 0.0000, 0.0000, 0.0000);
    CreateDynamicObject(13027, 2351.771484, 1504.643433, 45.035313, 0.0000, 0.0000, 179.6223);
    CreateDynamicObject(11292, 2270.467773, 1518.181641, 43.279629, 0.0000, 0.0000, 89.3814);
    CreateDynamicObject(1633, 2348.532227, 1598.486816, 36.856567, 0.0000, 0.0000, 0.0000);
	//unknown
    CreateDynamicObject(14548, 2590.675781, 1210.633057, 864.794373, 0.0000, 0.0000, 0.0000);
    CreateDynamicObject(14553, 2590.717041, 1206.893188, 865.002930, 0.0000, 0.0000, 0.0000);

}
StuntMaps()
{
	//LoadMap("Stunt Maps/Bigjump 1.txt");
	//LoadMap("Stunt Maps/LV Park.txt");
	//LoadMap("Stunt Maps/Hugejump.txt");
}
RaceMaps()
{
	//LoadMap("Race Maps/LS Circuit.txt",			RACE_WORLD);
	//LoadMap("Race Maps/Long Run.txt",			RACE_WORLD);
	//LoadMap("Race Maps/Speedway.txt",			RACE_WORLD);
	//LoadMap("Race Maps/BigEar.txt",				RACE_WORLD);
}
TestMaps()
{
	//LoadMap("Test Maps/Bounty Hunter.txt",		ABD_WORLD);
	//LoadMap("Test Maps/Broken City.txt",		ABD_WORLD);
	//LoadMap("Test Maps/Stunt City.txt",			ABD_WORLD);
	//LoadMap("Test Maps/Trainyard 2.txt",		ABD_WORLD);
	//LoadMap("Test Maps/Island Base.txt",		ABD_WORLD);
	//LoadMap("Test Maps/Jokers Dune Map.txt",	ABD_WORLD);
	//LoadMap("Test Maps/The Rig.txt",			ABD_WORLD);
//	//LoadMap("Test Maps/Dead City.txt",			ABD_WORLD);
	//LoadMap("Test Maps/Waterbase.txt",			ABD_WORLD);
	//LoadMap("Test Maps/Drughouse.txt",			ABD_WORLD);
}
AbandonMaps()
{
	//LoadMap("ABD Maps/QuarryEnt.txt",			FREEROAM_WORLD);
	//LoadMap("ABD Maps/Fort Metro.txt",			ABD_WORLD);
	//LoadMap("ABD Maps/Fort Southclaw.txt",		ABD_WORLD);
	//LoadMap("ABD Maps/Fort Defiance.txt",		ABD_WORLD);
	//LoadMap("ABD Maps/Fort Cagatay.txt",		ABD_WORLD);
	//LoadMap("ABD Maps/Fort Myst.txt",			ABD_WORLD);
	//LoadMap("ABD Maps/City Beta.txt",			ABD_WORLD);
	//LoadMap("ABD Maps/Blockaids.txt",			ABD_WORLD);
	//LoadMap("ABD Maps/Bone Underground.txt",	ABD_WORLD);
	//LoadMap("ABD Maps/Random Trash.txt",		ABD_WORLD);
	//LoadMap("ABD Maps/Quarry Cave.txt",			ABD_WORLD);
	//LoadMap("ABD Maps/Cave 2.txt",				ABD_WORLD);
	//LoadMap("ABD Maps/Cave 3.txt",				ABD_WORLD);
	//LoadMap("ABD Maps/Fence Area.txt",			ABD_WORLD);
	des_FenceGate=CreateDynamicObject(980, -29.601196289063, 2514.2014160156, 18.257766723633, 0, 0, 270.67565917969);


}
AdminIsland()
{
	//Vehicles
    ls_IslandV[0] = CreateVehicle(522,748.524,-2274.656,12.505,0.0,-1,-1,5000);
    ls_IslandV[1] = CreateVehicle(522,743.959,-2274.454,12.505,0.0,-1,-1,5000);
    ls_IslandV[2] = CreateVehicle(522,738.832,-2274.475,12.505,0.0,-1,-1,5000);
    ls_IslandV[3] = CreateVehicle(522,733.559,-2274.702,12.511,0.0,-1,-1,5000);
    ls_IslandV[4] = CreateVehicle(522,746.141,-2274.458,12.505,0.0,-1,-1,5000);
    ls_IslandV[5] = CreateVehicle(522,741.485,-2274.460,12.505,0.0,-1,-1,5000);
    ls_IslandV[6] = CreateVehicle(522,736.397,-2274.613,12.511,0.0,-1,-1,5000);
    ls_IslandV[7] = CreateVehicle(411,739.8333,-2237.3860,12.5716,180.0758,64,1,5000);
    ls_IslandV[8] = CreateVehicle(451,734.0182,-2237.7031,12.5531,181.4758,125,125,5000);
    ls_IslandV[9] = CreateVehicle(562,745.3376,-2237.3801,12.5029,179.4346,35,1,5000);
    ls_IslandV[10] = CreateVehicle(560,729.6592,-2237.8525,12.5503,185.3224,9,39,5000);
    ls_IslandV[11] = CreateVehicle(409,738.1107,-2230.9463,12.6445,93.7368,1,1,5000);
    ls_IslandV[12] = CreateVehicle(487,721.7079,-2254.7280,30.7121,320.6754,26,3,5000);
    ls_IslandV[13] = CreateVehicle(520,716.2269,-2263.7908,13.5678,272.5697,0,0,0);
    ls_IslandV[14] = CreateVehicle(520,715.5283,-2248.2231,13.5681,272.5697,0,0,0);
	//Objects
    ls_IslandObj[1]=CreateDynamicObject(18450, 837.350, -2107.910, 11.464, 0.0, 0.0, -90.000);
    ls_IslandObj[2]=CreateDynamicObject(12814, 854.260, -2162.844, 11.803, 0.0, 0.0, -90.000);
    ls_IslandObj[3]=CreateDynamicObject(12814, 804.338, -2162.833, 11.805, 0.0, 0.0, -270.000);
    ls_IslandObj[4]=CreateDynamicObject(12814, 854.271, -2192.826, 11.805, 0.0, 0.0, -450.000);
    ls_IslandObj[5]=CreateDynamicObject(12814, 804.283, -2192.804, 11.807, 0.0, 0.0, -630.000);
    ls_IslandObj[6]=CreateDynamicObject(12814, 804.251, -2222.760, 11.807, 0.0, 0.0, -630.000);
    ls_IslandObj[7]=CreateDynamicObject(12814, 854.187, -2222.665, 11.807, 0.0, 0.0, -810.000);
    ls_IslandObj[8]=CreateDynamicObject(3749, 837.250, -2149.899, 17.669, 0.0, 0.0, 0.0);
    ls_IslandObj[9]=CreateDynamicObject(980, 837.244, -2149.939, 14.584, 0.0, 0.0, 0.0);
    ls_IslandObj[10]=CreateDynamicObject(17025, 876.174, -2151.946, 2.890, 0.0, 0.0, 123.750);
    ls_IslandObj[11]=CreateDynamicObject(17025, 878.464, -2184.449, 6.408, 0.0, 0.0, 67.500);
    ls_IslandObj[12]=CreateDynamicObject(17025, 881.334, -2221.275, 4.200, 0.0, 0.0, 67.500);
    ls_IslandObj[13]=CreateDynamicObject(17025, 816.580, -2145.026, 5.465, 0.0, 0.0, 157.500);
    ls_IslandObj[14]=CreateDynamicObject(17025, 783.391, -2149.385, 2.836, 0.0, 0.0, -157.500);
    ls_IslandObj[15]=CreateDynamicObject(17025, 777.933, -2169.582, 5.999, 0.0, 0.0, -135.000);
    ls_IslandObj[16]=CreateDynamicObject(17027, 864.180, -2163.320, 9.308, 0.0, 0.0, -112.500);
    ls_IslandObj[17]=CreateDynamicObject(17029, 871.987, -2159.779, 1.277, 0.0, 0.0, -45.000);
    ls_IslandObj[18]=CreateDynamicObject(11490, 846.284, -2177.387, 11.806, 0.0, 0.0, -270.000);
    ls_IslandObj[19]=CreateDynamicObject(11491, 857.327, -2177.355, 13.313, 0.0, 0.0, 90.000);
    ls_IslandObj[20]=CreateDynamicObject(7885, 802.518, -2194.951, 11.813, 0.0, 0.0, 180.000);
    ls_IslandObj[21]=CreateDynamicObject(12814, 854.343, -2252.534, 11.810, 0.0, 0.0, -810.000);
    ls_IslandObj[22]=CreateDynamicObject(12814, 804.454, -2252.694, 11.810, 0.0, 0.0, -990.000);
    ls_IslandObj[23]=CreateDynamicObject(12814, 804.477, -2282.512, 11.812, 0.0, 0.0, -990.000);
    ls_IslandObj[24]=CreateDynamicObject(12814, 854.338, -2282.369, 11.812, 0.0, 0.0, -1170.000);
    ls_IslandObj[25]=CreateDynamicObject(18228, 875.453, -2209.554, 5.122, 0.0, 0.0, 56.250);
    ls_IslandObj[26]=CreateDynamicObject(18228, 877.584, -2250.809, 3.196, 0.0, 0.0, 56.250);
    ls_IslandObj[27]=CreateDynamicObject(18228, 879.495, -2271.862, 3.502, 0.0, 0.0, 56.250);
    ls_IslandObj[28]=CreateDynamicObject(18228, 861.649, -2295.437, 2.650, 0.0, 0.0, -45.000);
    ls_IslandObj[29]=CreateDynamicObject(18228, 824.530, -2291.602, 5.372, 0.0, 0.0, -45.000);
    ls_IslandObj[30]=CreateDynamicObject(18228, 796.535, -2291.979, 2.499, 0.0, 0.0, -45.000);
    ls_IslandObj[31]=CreateDynamicObject(12814, 754.768, -2252.541, 11.812, 0.0, 0.0, -1170.000);
    ls_IslandObj[32]=CreateDynamicObject(12814, 754.652, -2281.276, 11.815, 0.0, 0.0, -1170.000);
    ls_IslandObj[33]=CreateDynamicObject(12814, 754.789, -2222.571, 11.787, 0.0, 0.0, -1170.000);
    ls_IslandObj[34]=CreateDynamicObject(12814, 704.863, -2222.660, 11.790, 0.0, 0.0, -1350.000);
    ls_IslandObj[35]=CreateDynamicObject(12814, 704.864, -2252.463, 11.815, 0.0, 0.0, -1350.000);
    ls_IslandObj[36]=CreateDynamicObject(12814, 704.969, -2281.233, 11.817, 0.0, 0.0, -1350.000);
    ls_IslandObj[37]=CreateDynamicObject(3816, 725.220, -2254.746, 20.368, 0.0, 0.0, 90.000);
    ls_IslandObj[38]=CreateDynamicObject(18228, 780.267, -2295.933, 3.877, 0.0, 0.0, -45.000);
    ls_IslandObj[39]=CreateDynamicObject(18228, 748.350, -2302.986, 2.808, 0.0, 0.0, -45.000);
    ls_IslandObj[40]=CreateDynamicObject(18228, 724.439, -2305.264, 5.982, 0.0, 0.0, -45.000);
    ls_IslandObj[41]=CreateDynamicObject(18228, 692.056, -2301.912, 3.504, 0.0, 0.0, -78.750);
    ls_IslandObj[42]=CreateDynamicObject(18228, 680.570, -2265.282, 5.262, 0.0, 0.0, -123.750);
    ls_IslandObj[43]=CreateDynamicObject(18228, 682.820, -2225.768, 4.788, 0.0, 0.0, -123.750);
    ls_IslandObj[44]=CreateDynamicObject(18228, 704.195, -2202.676, 5.754, 0.0, 0.0, -213.750);
    ls_IslandObj[45]=CreateDynamicObject(18228, 734.026, -2202.411, 3.707, 0.0, 0.0, -213.750);
    ls_IslandObj[46]=CreateDynamicObject(18228, 750.744, -2203.760, 4.847, 0.0, 0.0, -213.750);
    ls_IslandObj[47]=CreateDynamicObject(9241, 723.258, -2255.207, 28.715, 0.0, 0.0, -180.000);
    ls_IslandObj[48]=CreateDynamicObject(5822, 756.486, -2281.898, 17.797, 0.0, 0.0, 188.672);
    ls_IslandObj[49]=CreateDynamicObject(10841, 752.732, -2254.741, 19.774, 0.0, 0.0, -90.000);
    ls_IslandObj[50]=CreateDynamicObject(17071, 819.041, -2145.559, 15.928, 0.0, 0.0, 22.500);
    ls_IslandObj[51]=CreateDynamicObject(17071, 803.791, -2147.591, 16.547, 0.0, 0.0, 67.500);
    ls_IslandObj[52]=CreateDynamicObject(1432, 857.081, -2181.749, 13.449, 0.0, 0.0, 0.0);
    ls_IslandObj[53]=CreateDynamicObject(1895, 855.053, -2177.446, 14.266, 0.0, 0.0, 90.000);
    ls_IslandObj[54]=CreateDynamicObject(1978, 850.152, -2179.030, 14.365, 0.0, 0.0, 90.000);
    ls_IslandObj[55]=CreateDynamicObject(1979, 848.812, -2179.210, 14.338, 0.0, 0.0, 0.0);
    ls_IslandObj[56]=CreateDynamicObject(2188, 850.327, -2174.388, 14.299, 0.0, 0.0, 0.0);
    ls_IslandObj[57]=CreateDynamicObject(2778, 842.628, -2173.280, 13.307, 0.0, 0.0, 90.000);
    ls_IslandObj[58]=CreateDynamicObject(2779, 842.677, -2174.819, 13.307, 0.0, 0.0, 90.000);
    ls_IslandObj[59]=CreateDynamicObject(2785, 842.507, -2180.708, 14.158, 0.0, 0.0, -270.000);
    ls_IslandObj[60]=CreateDynamicObject(1684, 861.650, -2197.135, 13.403, 0.0, 0.0, -78.750);
    ls_IslandObj[61]=CreateDynamicObject(5837, 845.008, -2048.841, 13.585, 0.0, 0.0, 90.000);
    ls_IslandObj[62]=CreateDynamicObject(5837, 829.234, -2049.692, 13.585, 0.0, 0.0, -90.000);
    ls_IslandObj[63]=CreateDynamicObject(974, 826.469, -2067.926, 14.756, 0.0, 0.0, 0.0);
    ls_IslandObj[64]=CreateDynamicObject(974, 823.135, -2067.903, 14.756, 0.0, 0.0, 0.0);
    ls_IslandObj[65]=CreateDynamicObject(974, 849.540, -2067.899, 14.756, 0.0, 0.0, 0.0);
    ls_IslandObj[66]=CreateDynamicObject(974, 848.113, -2067.877, 14.756, 0.0, 0.0, 0.0);
    ls_IslandObj[67]=CreateDynamicObject(974, 844.682, -2064.566, 14.645, 0.0, 0.0, -90.000);
    ls_IslandObj[68]=CreateDynamicObject(974, 829.652, -2064.612, 14.645, 0.0, 0.0, -90.000);
    ls_IslandObj[69]=CreateDynamicObject(974, 829.676, -2058.141, 14.645, 0.0, 0.0, -90.000);
    ls_IslandObj[70]=CreateDynamicObject(974, 844.621, -2057.883, 14.645, 0.0, 0.0, -90.000);
    ls_IslandObj[71]=CreateDynamicObject(980, 837.253, -2054.727, 14.641, 0.0, 0.0, 0.0);
    ls_IslandObj[72]=CreateDynamicObject(974, 828.204, -2054.813, 14.645, 0.0, 0.0, 0.0);
    ls_IslandObj[73]=CreateDynamicObject(974, 823.426, -2054.829, 14.645, 0.0, 0.0, 0.0);
    ls_IslandObj[74]=CreateDynamicObject(974, 846.389, -2054.723, 14.645, 0.0, 0.0, 0.0);
    ls_IslandObj[75]=CreateDynamicObject(974, 849.448, -2054.683, 14.645, 0.0, 0.0, 0.0);
    ls_IslandObj[76]=CreateDynamicObject(3279, 850.469, -2059.762, 11.943, 0.0, 0.0, -90.000);
    ls_IslandObj[77]=CreateDynamicObject(3279, 823.321, -2060.341, 11.943, 0.0, 0.0, 0.0);
    ls_IslandObj[78]=CreateDynamicObject(1248, 830.946, -2054.805, 17.049, 0.0, 0.0, -180.000);
    ls_IslandObj[79]=CreateDynamicObject(1248, 843.455, -2054.715, 17.203, 0.0, 0.0, -168.750);
    ls_IslandObj[80]=CreateDynamicObject(3461, 843.180, -2054.251, 13.442, 0.0, 0.0, 0.0);
    ls_IslandObj[81]=CreateDynamicObject(3461, 831.139, -2054.449, 13.442, 0.0, 0.0, 0.0);
    ls_IslandObj[82]=CreateDynamicObject(3472, 823.671, -2051.603, 12.236, 0.0, 0.0, 0.0);
    ls_IslandObj[83]=CreateDynamicObject(3472, 850.426, -2052.656, 12.236, 0.0, 0.0, 0.0);
    ls_IslandObj[84]=CreateDynamicObject(3528, 844.113, -2046.111, 18.208, 0.0, 0.0, -191.250);
    ls_IslandObj[85]=CreateDynamicObject(3528, 829.909, -2046.141, 18.201, 0.0, 0.0, 0.0);
    ls_IslandObj[86]=CreateDynamicObject(3877, 843.879, -2068.698, 13.676, 0.0, 0.0, 0.0);
    ls_IslandObj[87]=CreateDynamicObject(3877, 830.526, -2069.195, 13.676, 0.0, 0.0, 0.0);
    ls_IslandObj[88]=CreateDynamicObject(3605, 851.238, -2228.631, 17.921, 0.0, 0.0, -90.000);
    ls_IslandObj[89]=CreateDynamicObject(8397, 766.6036, -2225.1509, 12.8074, 0, 0, 0);
    ls_IslandObj[90]=CreateDynamicObject(1341, 769.6404, -2272.3474, 12.3945, 0, 0, 0);
}
MoveIslandUp()
{
        MoveDynamicObject(ls_IslandObj[1],837.350,-2107.910,11.464,3);
        MoveDynamicObject(ls_IslandObj[2],854.260,-2162.844,11.803,3);
        MoveDynamicObject(ls_IslandObj[3],804.338,-2162.833,11.805,3);
        MoveDynamicObject(ls_IslandObj[4],854.271,-2192.826,11.805,3);
        MoveDynamicObject(ls_IslandObj[5],804.283,-2192.804,11.807,3);
        MoveDynamicObject(ls_IslandObj[6],804.251,-2222.760,11.807,3);
        MoveDynamicObject(ls_IslandObj[7],854.187,-2222.665,11.807,3);
        MoveDynamicObject(ls_IslandObj[8],837.250,-2149.899,17.669,3);
        MoveDynamicObject(ls_IslandObj[9],837.244,-2149.939,14.584,3);
        MoveDynamicObject(ls_IslandObj[10],876.174,-2151.946,2.890,3);
        MoveDynamicObject(ls_IslandObj[11],878.464,-2184.449,6.408,3);
        MoveDynamicObject(ls_IslandObj[12],881.334,-2221.275,4.200,3);
        MoveDynamicObject(ls_IslandObj[13],816.580,-2145.026,5.465,3);
        MoveDynamicObject(ls_IslandObj[14],783.391,-2149.385,2.836,3);
        MoveDynamicObject(ls_IslandObj[15],777.933,-2169.582,5.999,3);
        MoveDynamicObject(ls_IslandObj[16],864.180,-2163.320,9.308,3);
        MoveDynamicObject(ls_IslandObj[17],871.987,-2159.779,1.277,3);
        MoveDynamicObject(ls_IslandObj[18],846.284,-2177.387,11.806,3);
        MoveDynamicObject(ls_IslandObj[19],857.327,-2177.355,13.313,3);
        MoveDynamicObject(ls_IslandObj[20],802.518,-2194.951,11.813,3);
        MoveDynamicObject(ls_IslandObj[21],854.343,-2252.534,11.810,3);
        MoveDynamicObject(ls_IslandObj[22],804.454,-2252.694,11.810,3);
        MoveDynamicObject(ls_IslandObj[23],804.477,-2282.512,11.812,3);
        MoveDynamicObject(ls_IslandObj[24],854.338,-2282.369,11.812,3);
        MoveDynamicObject(ls_IslandObj[25],875.453,-2209.554,5.122,3);
        MoveDynamicObject(ls_IslandObj[26],877.584,-2250.809,3.196,3);
        MoveDynamicObject(ls_IslandObj[27],879.495,-2271.862,3.502,3);
        MoveDynamicObject(ls_IslandObj[28],861.649,-2295.437,2.650,3);
        MoveDynamicObject(ls_IslandObj[29],824.530,-2291.602,5.372,3);
        MoveDynamicObject(ls_IslandObj[30],796.535,-2291.979,2.499,3);
        MoveDynamicObject(ls_IslandObj[31],754.768,-2252.541,11.812,3);
        MoveDynamicObject(ls_IslandObj[32],754.652,-2281.276,11.815,3);
        MoveDynamicObject(ls_IslandObj[33],754.789,-2222.571,11.787,3);
        MoveDynamicObject(ls_IslandObj[34],704.863,-2222.660,11.790,3);
        MoveDynamicObject(ls_IslandObj[35],704.864,-2252.463,11.815,3);
        MoveDynamicObject(ls_IslandObj[36],704.969,-2281.233,11.817,3);
        MoveDynamicObject(ls_IslandObj[37],725.220,-2254.746,20.368,3);
        MoveDynamicObject(ls_IslandObj[38],780.267,-2295.933,3.877,3);
        MoveDynamicObject(ls_IslandObj[39],748.350,-2302.986,2.808,3);
        MoveDynamicObject(ls_IslandObj[40],724.439,-2305.264,5.982,3);
        MoveDynamicObject(ls_IslandObj[41],692.056,-2301.912,3.504,3);
        MoveDynamicObject(ls_IslandObj[42],680.570,-2265.282,5.262,3);
        MoveDynamicObject(ls_IslandObj[43],682.820,-2225.768,4.788,3);
        MoveDynamicObject(ls_IslandObj[44],704.195,-2202.676,5.754,3);
        MoveDynamicObject(ls_IslandObj[45],734.026,-2202.411,3.707,3);
        MoveDynamicObject(ls_IslandObj[46],750.744,-2203.760,4.847,3);
        MoveDynamicObject(ls_IslandObj[47],723.258,-2255.207,28.715,3);
        MoveDynamicObject(ls_IslandObj[48],756.486,-2281.898,17.797,3);
        MoveDynamicObject(ls_IslandObj[49],752.732,-2254.741,19.774,3);
        MoveDynamicObject(ls_IslandObj[50],819.041,-2145.559,15.928,3);
        MoveDynamicObject(ls_IslandObj[51],803.791,-2147.591,16.547,3);
        MoveDynamicObject(ls_IslandObj[52],857.081,-2181.749,13.449,3);
        MoveDynamicObject(ls_IslandObj[53],855.053,-2177.446,14.266,3);
        MoveDynamicObject(ls_IslandObj[54],850.152,-2179.030,14.365,3);
        MoveDynamicObject(ls_IslandObj[55],848.812,-2179.210,14.338,3);
        MoveDynamicObject(ls_IslandObj[56],850.327,-2174.388,14.299,3);
        MoveDynamicObject(ls_IslandObj[57],842.628,-2173.280,13.307,3);
        MoveDynamicObject(ls_IslandObj[58],842.677,-2174.819,13.307,3);
        MoveDynamicObject(ls_IslandObj[59],842.507,-2180.708,14.158,3);
        MoveDynamicObject(ls_IslandObj[60],861.650,-2197.135,13.403,3);
        MoveDynamicObject(ls_IslandObj[61],845.008,-2048.841,13.585,3);
        MoveDynamicObject(ls_IslandObj[62],829.234,-2049.692,13.585,3);
        MoveDynamicObject(ls_IslandObj[63],826.469,-2067.926,14.756,3);
        MoveDynamicObject(ls_IslandObj[64],823.135,-2067.903,14.756,3);
        MoveDynamicObject(ls_IslandObj[65],849.540,-2067.899,14.756,3);
        MoveDynamicObject(ls_IslandObj[66],848.113,-2067.877,14.756,3);
        MoveDynamicObject(ls_IslandObj[67],844.682,-2064.566,14.645,3);
        MoveDynamicObject(ls_IslandObj[68],829.652,-2064.612,14.645,3);
        MoveDynamicObject(ls_IslandObj[69],829.676,-2058.141,14.645,3);
        MoveDynamicObject(ls_IslandObj[70],844.621,-2057.883,14.645,3);
        MoveDynamicObject(ls_IslandObj[71],837.253,-2054.727,14.641,3);
        MoveDynamicObject(ls_IslandObj[72],828.204,-2054.813,14.645,3);
        MoveDynamicObject(ls_IslandObj[73],823.426,-2054.829,14.645,3);
        MoveDynamicObject(ls_IslandObj[74],846.389,-2054.723,14.645,3);
        MoveDynamicObject(ls_IslandObj[75],849.448,-2054.683,14.645,3);
        MoveDynamicObject(ls_IslandObj[76],850.469,-2059.762,11.943,3);
        MoveDynamicObject(ls_IslandObj[77],823.321,-2060.341,11.943,3);
        MoveDynamicObject(ls_IslandObj[78],830.946,-2054.805,17.049,3);
        MoveDynamicObject(ls_IslandObj[79],843.455,-2054.715,17.203,3);
        MoveDynamicObject(ls_IslandObj[80],843.180,-2054.251,13.442,3);
        MoveDynamicObject(ls_IslandObj[81],831.139,-2054.449,13.442,3);
        MoveDynamicObject(ls_IslandObj[82],823.671,-2051.603,12.236,3);
        MoveDynamicObject(ls_IslandObj[83],850.426,-2052.656,12.236,3);
        MoveDynamicObject(ls_IslandObj[84],844.113,-2046.111,18.208,3);
        MoveDynamicObject(ls_IslandObj[85],829.909,-2046.141,18.201,3);
        MoveDynamicObject(ls_IslandObj[86],843.879,-2068.698,13.676,3);
        MoveDynamicObject(ls_IslandObj[87],830.526,-2069.195,13.676,3);
        MoveDynamicObject(ls_IslandObj[88],851.238,-2228.631,17.921,3);
        MoveDynamicObject(ls_IslandObj[89],851.238,-2228.631,17.921,3);
        MoveDynamicObject(ls_IslandObj[90],851.238,-2228.631,17.921,3);
}
MoveIslandDown()
{
        MoveDynamicObject(ls_IslandObj[1],837.350,-2107.910,-20.464,3);
        MoveDynamicObject(ls_IslandObj[2],854.260,-2162.844,-20.803,3);
        MoveDynamicObject(ls_IslandObj[3],804.338,-2162.833,-20.805,3);
        MoveDynamicObject(ls_IslandObj[4],854.271,-2192.826,-20.805,3);
        MoveDynamicObject(ls_IslandObj[5],804.283,-2192.804,-20.807,3);
        MoveDynamicObject(ls_IslandObj[6],804.251,-2222.760,-20.807,3);
        MoveDynamicObject(ls_IslandObj[7],854.187,-2222.665,-20.807,3);
        MoveDynamicObject(ls_IslandObj[8],837.250,-2149.899,-20.669,3);
        MoveDynamicObject(ls_IslandObj[9],837.244,-2149.939,-20.584,3);
        MoveDynamicObject(ls_IslandObj[10],876.174,-2151.946,-20.890,3);
        MoveDynamicObject(ls_IslandObj[11],878.464,-2184.449,-20.408,3);
        MoveDynamicObject(ls_IslandObj[12],881.334,-2221.275,-20.200,3);
        MoveDynamicObject(ls_IslandObj[13],816.580,-2145.026,-20.465,3);
        MoveDynamicObject(ls_IslandObj[14],783.391,-2149.385,-20.836,3);
        MoveDynamicObject(ls_IslandObj[15],777.933,-2169.582,-20.999,3);
        MoveDynamicObject(ls_IslandObj[16],864.180,-2163.320,-20.308,3);
        MoveDynamicObject(ls_IslandObj[17],871.987,-2159.779,-20.277,3);
        MoveDynamicObject(ls_IslandObj[18],846.284,-2177.387,-20.806,3);
        MoveDynamicObject(ls_IslandObj[19],857.327,-2177.355,-20.313,3);
        MoveDynamicObject(ls_IslandObj[20],802.518,-2194.951,-20.813,3);
        MoveDynamicObject(ls_IslandObj[21],854.343,-2252.534,-20.810,3);
        MoveDynamicObject(ls_IslandObj[22],804.454,-2252.694,-20.810,3);
        MoveDynamicObject(ls_IslandObj[23],804.477,-2282.512,-20.812,3);
        MoveDynamicObject(ls_IslandObj[24],854.338,-2282.369,-20.812,3);
        MoveDynamicObject(ls_IslandObj[25],875.453,-2209.554,-20.122,3);
        MoveDynamicObject(ls_IslandObj[26],877.584,-2250.809,-20.196,3);
        MoveDynamicObject(ls_IslandObj[27],879.495,-2271.862,-20.502,3);
        MoveDynamicObject(ls_IslandObj[28],861.649,-2295.437,-20.650,3);
        MoveDynamicObject(ls_IslandObj[29],824.530,-2291.602,-20.372,3);
        MoveDynamicObject(ls_IslandObj[30],796.535,-2291.979,-20.499,3);
        MoveDynamicObject(ls_IslandObj[31],754.768,-2252.541,-20.812,3);
        MoveDynamicObject(ls_IslandObj[32],754.652,-2281.276,-20.815,3);
        MoveDynamicObject(ls_IslandObj[33],754.789,-2222.571,-20.787,3);
        MoveDynamicObject(ls_IslandObj[34],704.863,-2222.660,-20.790,3);
        MoveDynamicObject(ls_IslandObj[35],704.864,-2252.463,-20.815,3);
        MoveDynamicObject(ls_IslandObj[36],704.969,-2281.233,-20.817,3);
        MoveDynamicObject(ls_IslandObj[37],725.220,-2254.746,-20.368,3);
        MoveDynamicObject(ls_IslandObj[38],780.267,-2295.933,-20.877,3);
        MoveDynamicObject(ls_IslandObj[39],748.350,-2302.986,-20.808,3);
        MoveDynamicObject(ls_IslandObj[40],724.439,-2305.264,-20.982,3);
        MoveDynamicObject(ls_IslandObj[41],692.056,-2301.912,-20.504,3);
        MoveDynamicObject(ls_IslandObj[42],680.570,-2265.282,-20.262,3);
        MoveDynamicObject(ls_IslandObj[43],682.820,-2225.768,-20.788,3);
        MoveDynamicObject(ls_IslandObj[44],704.195,-2202.676,-20.754,3);
        MoveDynamicObject(ls_IslandObj[45],734.026,-2202.411,-20.707,3);
        MoveDynamicObject(ls_IslandObj[46],750.744,-2203.760,-20.847,3);
        MoveDynamicObject(ls_IslandObj[47],723.258,-2255.207,-20.715,3);
        MoveDynamicObject(ls_IslandObj[48],756.486,-2281.898,-20.797,3);
        MoveDynamicObject(ls_IslandObj[49],752.732,-2254.741,-20.774,3);
        MoveDynamicObject(ls_IslandObj[50],819.041,-2145.559,-20.928,3);
        MoveDynamicObject(ls_IslandObj[51],803.791,-2147.591,-20.547,3);
        MoveDynamicObject(ls_IslandObj[52],857.081,-2181.749,-20.449,3);
        MoveDynamicObject(ls_IslandObj[53],855.053,-2177.446,-20.266,3);
        MoveDynamicObject(ls_IslandObj[54],850.152,-2179.030,-20.365,3);
        MoveDynamicObject(ls_IslandObj[55],848.812,-2179.210,-20.338,3);
        MoveDynamicObject(ls_IslandObj[56],850.327,-2174.388,-20.299,3);
        MoveDynamicObject(ls_IslandObj[57],842.628,-2173.280,-20.307,3);
        MoveDynamicObject(ls_IslandObj[58],842.677,-2174.819,-20.307,3);
        MoveDynamicObject(ls_IslandObj[59],842.507,-2180.708,-20.158,3);
        MoveDynamicObject(ls_IslandObj[60],861.650,-2197.135,-20.403,3);
        MoveDynamicObject(ls_IslandObj[61],845.008,-2048.841,-20.585,3);
        MoveDynamicObject(ls_IslandObj[62],829.234,-2049.692,-20.585,3);
        MoveDynamicObject(ls_IslandObj[63],826.469,-2067.926,-20.756,3);
        MoveDynamicObject(ls_IslandObj[64],823.135,-2067.903,-20.756,3);
        MoveDynamicObject(ls_IslandObj[65],849.540,-2067.899,-20.756,3);
        MoveDynamicObject(ls_IslandObj[66],848.113,-2067.877,-20.756,3);
        MoveDynamicObject(ls_IslandObj[67],844.682,-2064.566,-20.645,3);
        MoveDynamicObject(ls_IslandObj[68],829.652,-2064.612,-20.645,3);
        MoveDynamicObject(ls_IslandObj[69],829.676,-2058.141,-20.645,3);
        MoveDynamicObject(ls_IslandObj[70],844.621,-2057.883,-20.645,3);
        MoveDynamicObject(ls_IslandObj[71],837.253,-2054.727,-20.641,3);
        MoveDynamicObject(ls_IslandObj[72],828.204,-2054.813,-20.645,3);
        MoveDynamicObject(ls_IslandObj[73],823.426,-2054.829,-20.645,3);
        MoveDynamicObject(ls_IslandObj[74],846.389,-2054.723,-20.645,3);
        MoveDynamicObject(ls_IslandObj[75],849.448,-2054.683,-20.645,3);
        MoveDynamicObject(ls_IslandObj[76],850.469,-2059.762,-20.943,3);
        MoveDynamicObject(ls_IslandObj[77],823.321,-2060.341,-20.943,3);
        MoveDynamicObject(ls_IslandObj[78],830.946,-2054.805,-20.049,3);
        MoveDynamicObject(ls_IslandObj[79],843.455,-2054.715,-20.203,3);
        MoveDynamicObject(ls_IslandObj[80],843.180,-2054.251,-20.442,3);
        MoveDynamicObject(ls_IslandObj[81],831.139,-2054.449,-20.442,3);
        MoveDynamicObject(ls_IslandObj[82],823.671,-2051.603,-20.236,3);
        MoveDynamicObject(ls_IslandObj[83],850.426,-2052.656,-20.236,3);
        MoveDynamicObject(ls_IslandObj[84],844.113,-2046.111,-20.208,3);
        MoveDynamicObject(ls_IslandObj[85],829.909,-2046.141,-20.201,3);
        MoveDynamicObject(ls_IslandObj[86],843.879,-2068.698,-20.676,3);
        MoveDynamicObject(ls_IslandObj[87],830.526,-2069.195,-20.676,3);
        MoveDynamicObject(ls_IslandObj[88],851.238,-2228.631,-20.921,3);
        MoveDynamicObject(ls_IslandObj[89],851.238,-2228.631,-20.921,3);
        MoveDynamicObject(ls_IslandObj[90],851.238,-2228.631,-20.921,3);
}
